home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 February
/
EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso
/
enigma
/
earcd
/
comm
/
comm2
/
mstrmn11.lha
/
MastE!rMind
< prev
next >
Wrap
Text File
|
1996-11-09
|
10KB
|
320 lines
/*************************************************************************/
/* MastE!rMind v1.1 for Excelsior! BBS by Morpheus */
/*************************************************************************/
path='Doors:MastE!rMind/'
/*************************************************************************/
options results
if ~open('HiScore',path||'MastE!rMind.data','R') then;do
if ~open('HiScore',path||'MastE!rMind.data','W') then;do
transmit 'Error: Could not create new highscore file!\w3'
call quit_game
end
bbsidentify SYSOP
sysop=result
do i=1 for 10
alias.i=sysop
writeln('HiScore',alias.i)
score.i=1100-(i*100)
writeln('HiScore',score.i)
end
close('HiScore')
end
else;do
do i=1 for 10
alias.i=readln('HiScore')
score.i=readln('HiScore')
end
close('HiScore')
end
quit=0
call show_hiscore
do forever
call show_screen
do i=1 for 4
code.i=1+rnd(6)
end
time('R')
move=1
do while move<=10
call get_invoer
call check_invoer
call show_hint(3+2*move)
if zwart=4 then;do
klok=time('E')
klok=delstr(klok,length(klok)-2,3)
call show_win
move=10
end
move=move+1
end
if zwart~=4 then call show_lose
end
exit
rnd:
return (random(1,100,time(s))+random(1,100,time(s))+random(1,100,time(s)))//arg(1)
show_screen:
transmit '\f1\@6\n1 \c7ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿'
transmit ' ³ \c6M a s t E ! r M i n d \c7³'
transmit ' ÃÄÄÄÄÂÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿'
transmit ' ³ \c61 \c7³ \c6úúúú \c7³ ±± ±± ±± ±± ³ ³ \c6I n s t r u c t i o n s \c7³'
transmit ' ³ ÃÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´'
transmit ' ³ \c62 \c7³ \c6úúúú \c7³ ±± ±± ±± ±± ³ ³ \c6Use cursor-keys to choose colour \c7³'
transmit ' ³ ÃÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³ ³'
transmit ' ³ \c63 \c7³ \c6úúúú \c7³ ±± ±± ±± ±± ³ ³ \c6Press <Enter> or <Space> to select \c7³'
transmit ' ³ ÃÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³ ³'
transmit ' ³ \c64 \c7³ \c6úúúú \c7³ ±± ±± ±± ±± ³ ³ \c6Press <Del> or <Backspace> to undo \c7³'
transmit ' ³ ÃÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³ ³'
transmit ' ³ \c65 \c7³ \c6úúúú \c7³ ±± ±± ±± ±± ³ ³ \c6Press <Q> or <Esc> to quit \c7³'
transmit ' ³ ÃÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´'
transmit ' ³ \c66 \c7³ \c6úúúú \c7³ ±± ±± ±± ±± ³ ³ \c6+ ú right colour, right position \c7³'
transmit ' ³ ÃÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³ ³'
transmit ' ³ \c67 \c7³ \c6úúúú \c7³ ±± ±± ±± ±± ³ ³ \c6- ú right colour, wrong position \c7³'
transmit ' ³ ÃÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ'
transmit ' ³ \c68 \c7³ \c6úúúú \c7³ ±± ±± ±± ±± ³'
transmit ' ³ ÃÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ÚÄÄÄ¿ÚÄÄÄ¿ÚÄÄÄ¿ÚÄÄÄ¿ÚÄÄÄ¿ÚÄÄÄ¿'
transmit ' ³ \c69 \c7³ \c6úúúú \c7³ ±± ±± ±± ±± ³ ³\c1ÛÛÛ\c7³³\c2ÛÛÛ\c7³³\c3ÛÛÛ\c7³³\c4ÛÛÛ\c7³³\c5ÛÛÛ\c7³³\c6ÛÛÛ\c7³'
transmit ' ³ ÃÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³\c1ÛÛÛ\c7³³\c2ÛÛÛ\c7³³\c3ÛÛÛ\c7³³\c4ÛÛÛ\c7³³\c5ÛÛÛ\c7³³\c6ÛÛÛ\c7³'
transmit ' ³ \c610 \c7³ \c6úúúú \c7³ ±± ±± ±± ±± ³ ÀÄÄÄÙÀÄÄÄÙÀÄÄÄÙÀÄÄÄÙÀÄÄÄÙÀÄÄÄÙ'
transmit ' ÃÄÄÄÄÁÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄ´'
transmit ' ³ \c6Written by /Y\\orpheus \c7³'
transmit ' ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ'
return
get_invoer:
transmit put_cursor2(43,1)
sendstring '30H'
invoer.1=1
i=1
do while i<=5&quit=0
call check_carrier
getchar
key=result
if key='1B'x then;do
checkio
if result='TRUE' then;do
getchar;getchar
key=result
if key='C' then key='6'
if key='D' then key='4'
end
else quit=1
end
else if key='D'x|key='5'|key=' ' then key='0'
select
when upper(key)='Q' then quit=1
when key='0'&i<=4 then;do
k=i
i=i+1
invoer.i=invoer.k
transmit put_colour(3+2*move,13+3*i,invoer.i)
sendstring '30H'
end
when key='0'&i=5 then;do
i=i+1
sendstring '43H\c6 '
sendstring '30H'
end
when key='4'&i<=4 then;do
transmit put_cursor1(38+5*invoer.i,invoer.i)
if invoer.i=1 then invoer.i=6
else invoer.i=invoer.i-1
transmit put_cursor2(38+5*invoer.i,invoer.i)
sendstring '30H'
end
when key='6'&i<=4 then;do
transmit put_cursor1(38+5*invoer.i,invoer.i)
if invoer.i=6 then invoer.i=1
else invoer.i=invoer.i+1
transmit put_cursor2(38+5*invoer.i,invoer.i)
sendstring '30H'
end
when (key='08'x|key='7F'x)&i>1 then;do
k=i
i=i-1
invoer.i=invoer.k
transmit undo_colour(3+2*move,13+3*k)
transmit put_cursor2(38+5*invoer.i,invoer.i)
sendstring '43H\c6 '
sendstring '30H'
end
otherwise nop
end
if i=5 then;do
transmit put_cursor1(38+5*invoer.i,invoer.i)
sendstring '43H\c6Press <Enter> to end this move.'
sendstring '30H'
end
end
if quit=1 then;do
transmit put_cursor1(38+5*invoer.i,invoer.i)
call quit_game
end
return
check_invoer:
zwart=0;wit=0
do i=1 for 4
temp.i=code.i
end
do i=1 for 4
if invoer.i=temp.i then;do
zwart=zwart+1
temp.i=0
end
end
if zwart<4 then
do i=1 for 4
if temp.i~=0 then;do
j=0
do while j~=3
idx=((i+j)//4)+1
if invoer.i=temp.idx then;do
wit=wit+1
temp.idx=10
j=3
end
else j=j+1
end
end
end
return
show_hint:
sendstring ''arg(1)';12H\c7'
i=1
do while i<=zwart
sendstring '+'
i=i+1
end
do while i<=(wit+zwart)
sendstring '-'
i=i+1
end
do while i<=4
sendstring ' '
i=i+1
end
sendstring '30H'
return
show_win:
if klok<600 then score=(600-klok)*20
else score=0
score=score+(11-move)*1000
sendstring '50H\c6Congratulations!'
sendstring '45HYou have cracked the code!'
sendstring '48HYour score is: '||score
if score>score.10 then;do
sendstring '48HYou have a high score!'
sendstring '41HPress <Enter> to view high scores.'
end
else sendstring '41HPress <Enter> to start a new game.'
sendstring '30H'
call check_carrier
getchar
key=result
if key='1B'x then;do
checkio
if result='TRUE' then;do
getchar
getchar
end
else call quit_game
end
else if upper(key)='Q' then call quit_game
if score>score.10 then;do
i=1
do while i<=10
if score>score.i then;do
j=10
do while j>i
k=j-1
score.j=score.k
alias.j=alias.k
j=j-1
end
score.i=score
getuser 1
alias.i=result
i=10
end
i=i+1
end
if ~open('HiScore',path||'MastE!rMind.data','W') then;do
transmit 'Error: Could not write to highscore file!\w3'
call quit_game
end
do i=1 for 10
writeln('HiScore',alias.i)
writeln('HiScore',score.i)
end
close('HiScore')
call show_hiscore
end
return
show_lose:
sendstring '41H\c6Sorry! You did not crack the code!'
sendstring '42HThe correct code is: \c'code.1'ÛÛ \c'code.2'ÛÛ \c'code.3'ÛÛ \c'code.4'ÛÛ'
sendstring '41H\c6Press <Enter> to start a new game.'
sendstring '30H'
call check_carrier
getchar
key=result
if key='1B'x then;do
checkio
if result='TRUE' then;do
getchar
getchar
end
else call quit_game
end
else if upper(key)='Q' then call quit_game
return
quit_game:
bbsidentify name
bbsname=result
sendstring '\f1\n3\c6'center('Returning to '||bbsname||'...',78)||'\n1\w3\q1'
exit
put_cursor1:
return ''arg(1)'H\c7ÚÄÄÄ¿\<5\!1³\z'arg(2)' \z0\c7³\<5\!1³\z'arg(2)' \z0\c7³\<5\!1ÀÄÄÄÙ'
put_cursor2:
return ''arg(1)'H\c3ÉÍÍÍ»\<5\!1º\z'arg(2)' \z0\c3º\<5\!1º\z'arg(2)' \z0\c3º\<5\!1ÈÍÍͼ'
put_colour:
return ''arg(1)';'arg(2)'H\c'arg(3)'ÛÛ'
undo_colour:
return ''arg(1)';'arg(2)'H\c7±±'
check_carrier:
getcarrier
if result='FALSE' then exit
return
show_hiscore:
transmit '\f1\@6'
transmit ' \c7ÛÛ\c4¿ \c7ÛÛ\c4¿ \c7ÛÛÛÛÛ\c4¿ \c7ÛÛÛÛÛ\c4¿ \c7ÛÛÛÛÛÛÛ\c4¿\c7ÛÛÛÛÛÛÛ\c4¿\c7ÛÛ\c4¿\c7ÛÛÛÛÛÛ\c4¿ \c7ÛÛ\c4¿ \c7ÛÛ\c4¿\c7ÛÛ\c4¿\c7ÛÛÛ\c4¿ \c7ÛÛ\c4¿\c7ÛÛÛÛÛÛ\c4¿'
transmit ' \c7\z6²²²\c4\z0¿\c7\z6²²²\c4\z0³\c7\z6²²\c4\z0ÚÄÄ\c7\z6²²\c4\z0¿\c7\z6²²\c4\z0ÚÄÄÄÙ ÀÄ\c7\z6²²\c4\z0ÚÄÄÙ\c7\z6²²\c4\z0ÚÄÄÄÄÙ\c7\z6²²\c4\z0³\c7\z6²²\c4\z0ÚÄÄ\c7\z6²²\c4\z0¿\c7\z6²²²\c4\z0¿\c7\z6²²²\c4\z0³\c7\z6²²\c4\z0³\c7\z6²²²²\c4\z0¿\c7\z6²²\c4\z0³\c7\z6²²\c4\z0ÚÄÄ\c7\z6²²\c4\z0¿'
transmit ' \c7\z6±±±±±±±\c4\z0³\c7\z6±±±±±±±\c4\z0³À\c7\z6±±±±±\c4\z0¿ \c7\z6±±\c4\z0³ \c7\z6±±±±±\c4\z0¿ \c7\z6±±\c4\z0³\c7\z6±±±±±±\c4\z0ÚÙ\c7\z6±±±±±±±\c4\z0³\c7\z6±±\c4\z0³\c7\z6±±\c4\z0Ú\c7\z6±±±±\c4\z0³\c7\z6±±\c4\z0³ \c7\z6±±\c4\z0³'
transmit ' \c7\z6°°\c4\z0Ú\c7\z6°\c4\z0Ú\c7\z6°°\c4\z0³\c7\z6°°\c4\z0ÚÄÄ\c7\z6°°\c4\z0³ ÀÄÄÄ\c7\z6°°\c4\z0¿ \c7\z6°°\c4\z0³ \c7\z6°°\c4\z0ÚÄÄÙ ÀÄÙ\c7\z6°°\c4\z0Ú\c7\z6°°\c4\z0ÚÙ \c7\z6°°\c4\z0Ú\c7\z6°\c4\z0Ú\c7\z6°°\c4\z0³\c7\z6°°\c4\z0³\c7\z6°°\c4\z0³À\c7\z6°°°\c4\z0³\c7\z6°°\c4\z0³ \c7\z6°°\c4\z0³'
transmit ' \z6 \z0³ÀÙ\z6 \z0³\z6 \z0³ \z6 \z0³\z6 \z0ÚÙ \z6 \z0³ \z6 \z0¿\z6 \z0¿\z6 \z0³À\z6 \z0¿ \z6 \z0³ÀÙ\z6 \z0³\z6 \z0³\z6 \z0³ À\z6 \z0³\z6 \z0ÚÙ'
transmit ' ÀÄÙ ÀÄÙÀÄÙ ÀÄÙÀÄÄÄÄÄÙ ÀÄÙ ÀÄÄÄÄÄÄÙÀÄÙÀÄÙ ÀÄÙ ÀÄÙ ÀÄÙÀÄÙÀÄÙ ÀÄÙÀÄÄÄÄÄÙ\n1'
transmit copies(' ',22)||'\c6É\c7Í'||copies('\c6Í\c7Í',16)||'\c6»'
transmit copies(' ',22)||'\c7º º'
transmit copies(' ',22)||'\c6º H\c7i\c6g\c7h \c6S\c7c\c6o\c7r\c6e\c7s \c6º'
transmit copies(' ',22)||'\c7º º'
transmit copies(' ',22)||'\c6Ì\c7Í'||copies('\c6Í\c7Í',16)||'\c6¹'
transmit copies(' ',22)||'\c7º º'
do i=1 for 10
if i//2 then kleur='\c6'
else kleur='\c7'
transmit copies(' ',22)||kleur||'º\c1'||right(i,3)||'. \c3'||left(alias.i,21,'.')||'\c2'||right(score.i,6)||kleur||' º'
end
transmit copies(' ',22)||'\c6º º'
transmit copies(' ',22)||'\c7È\c6Í'||copies('\c7Í\c6Í',16)||'\c7¼'
sendstring '\n1\c6'copies(' ',27)||'Press <Enter> to continue '
call check_carrier
getchar
key=result
if key='1B'x then;do
checkio
if result='TRUE' then;do
getchar
getchar
end
else call quit_game
end
else if upper(key)='Q' then call quit_game
return